package com.tc.vo;

import com.tc.domain.Reimbursement_record;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 报销记录视图对象
 * </p>
 *
 * @author tc
 * @since 2025-07-12
 */
@Data
@ApiModel(value = "Reimbursement_recordVO对象", description = "报销记录视图对象")
public class Reimbursement_recordVO {
    
    @ApiModelProperty(value = "主键id")
    private Long recordId;

    @ApiModelProperty(value = "患者ID")
    private Long patientId;
    
    @ApiModelProperty(value = "患者姓名")
    private String patientName;

    @ApiModelProperty(value = "总费用")
    private BigDecimal totalCost;

    @ApiModelProperty(value = "起付线")
    private BigDecimal deductible;

    @ApiModelProperty(value = "封顶线")
    private BigDecimal ceiling;

    @ApiModelProperty(value = "报销比例")
    private BigDecimal reimbursementRatio;

    @ApiModelProperty(value = "报销金额")
    private BigDecimal reimbursementAmount;

    @ApiModelProperty(value = "结算类型")
    private String settlementType;

    @ApiModelProperty(value = "报销时间")
    private LocalDateTime reimbursementTime;
    
    /**
     * 将实体对象转换为视图对象
     * @param record 实体对象
     * @return 视图对象
     */
    public static Reimbursement_recordVO fromEntity(Reimbursement_record record) {
        if (record == null) {
            return null;
        }
        
        Reimbursement_recordVO vo = new Reimbursement_recordVO();
        vo.setRecordId(record.getRecordId());
        vo.setPatientId(record.getPatientId());
        vo.setTotalCost(record.getTotalCost());
        vo.setDeductible(record.getDeductible());
        vo.setCeiling(record.getCeiling());
        vo.setReimbursementAmount(record.getReimbursementAmount());
        vo.setSettlementType(record.getSettlementType());
        vo.setReimbursementTime(record.getReimbursementTime());
        
        return vo;
    }
}
